<template>
  <div class="a">
    <div class="top">
      <div class="year">
        <span>年份</span>
        <el-date-picker v-model="value" type="year" placeholder="选择年">
        </el-date-picker>
        <span>至</span>
        <el-date-picker v-model="value1" type="year" placeholder="选择年">
        </el-date-picker>
      </div>
      <div class="zd">
        <span>站点</span>
        <el-select v-model="value" placeholder="请选择">
          <el-option
            v-for="item in options"
            :key="item.value"
            :label="item.label"
            :value="item.value"
          >
          </el-option>
        </el-select>
        <el-button type="small" style="margin-left: 10px">导出</el-button>
      </div>
    </div>
    <div class="tree">
      <el-tree
        :data="data"
        :props="defaultProps"
        @node-click="handleNodeClick"
      ></el-tree>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      value: "",
      value1: "",
      options: [],
      data: [
        {
          label: "一级 1",
          children: [
            {
              label: "二级 1-1",
              children: [
                {
                  label: "三级 1-1-1",
                },
              ],
            },
          ],
        },
        {
          label: "一级 2",
          children: [
            {
              label: "二级 2-1",
              children: [
                {
                  label: "三级 2-1-1",
                },
              ],
            },
            {
              label: "二级 2-2",
              children: [
                {
                  label: "三级 2-2-1",
                },
              ],
            },
          ],
        },
        {
          label: "一级 3",
          children: [
            {
              label: "二级 3-1",
              children: [
                {
                  label: "三级 3-1-1",
                },
              ],
            },
            {
              label: "二级 3-2",
              children: [
                {
                  label: "三级 3-2-1",
                },
              ],
            },
          ],
        },
      ],
      defaultProps: {
        children: "children",
        label: "label",
      },
    };
  },
  methods: {
    handleNodeClick() {},
  },
};
</script>
<style scoped lang="less">
.a {
  pointer-events: all;
  width: 100%;
  height: 100%;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  .el-date-editor,
  .el-input--suffix {
    width: 150px;
  }
  .top {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0 20px 0;
    border-top: 1px solid #dedede;
    border-bottom: 1px solid #dedede;
  }
  .year {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
  }
  .zd {
    display: flex;
    align-items: center;
    padding-bottom: 10px;
    margin-left: -40px;
  }
  .tree {
    margin-top: 20px;
    .el-tree {
      width: 300px;
    }
  }
}
</style>
